1. Field of the Invention
The present invention relates to an electric device, such as a memory card or a portable electric device, including a flash memory composed of a non-volatile memory, and a control section controlling the flash memory, by which a system can be recovered and the recovery operation can be accurately and easily performed, when the system is down because of a reason, such as a power failure or a system error occurrence.
2. Description of the Related Art
A portable electric device, such as a memory card or an electric palmtop computer, in which a flash memory is built, records data in the built-in flash memory, and reads the recorded data out as meeting the requirement. The flash memory is, generally, composed of a non-volatile memory having a floating gate type MOS transistor, in which a program operation for recording data, an erase operation for erasing data, and a read operation for reading data out are executed. In comparison with a read mode operation, a program or erase mode operation requires more time than the read mode operation, in general. However, as a flash memory is a non-volatile memory, in which the recorded data is maintained while an electric source is shutting out, it is well-known that the flash memory is suitable to use in an electric device, such as a memory card or portable electric device, used in a status where the use of the electric source has a limitation.
FIG. 13 is a structural diagram of the conventional comparatively small-scaled electric device, such as a memory card. The electric device 100 includes a main memory 2 composed of a flash memory 2, and a control circuit 1 for controlling the flash memory 2. The main memory 2 and the control circuit 1 are connected each other by a bus 4. The electric device 100 is attached to a personal computer to record user data in the main memory 2. To meet the requirement sent from the personal computer, the control circuit 1 supplies a command of several cycles to the main memory 2 through the bus 4, and the main memory 2 executes an erase or program operation in response to the supplied command.
FIG. 14 is a structural diagram of the conventional comparatively large scaled electric device, such as a portable electric device. The electric device 100 further includes a temporary memory 3, such as a DRAM or SRAM, by which data can be written in a comparatively higher speed, in addition to the control circuit 1 and the main memory 2 composed of a flash memory, which are described above. The temporary memory 3 is connected to the control circuit 1 through a bus 5 and temporary memory control line 6. Then, the temporary memory 3 composed of a volatile memory is connected to a buttery 8 to make it possible to maintain data, when the electric source is shut down.
When the control circuit 1 writes a data to the main memory 2 the write data is temporally written to the temporary memory 3, the write data temporally recorded in the temporary memory 3 is written to the main memory 2, which requires a comparatively long time to write data, with relatively longer time. Attribute information, such as bender information of the electric device 100, is also recorded in the temporary memory 3.
The above-described electric device where the conventional flash memory is built in has no way to obtain the status information, when an error occurs or an electric source is shut down during the program or erase operation, after the system is recovered. In case of the card memory, therefore, it requires to give functions of detecting the status, when an electric source is shut down or an error occurs while using a card memory, and of recovering from such situation to a card driver or file system of a personal computer. That also causes large load on the system side.
Although the memory card is useful to bring out, however, there is a problem such that an error can not be detected, when an error generating factor is included in the card memory. Thereby, a diversion of the card memory is lost.
In the case where a temporary memory 3 is included in an electric device as show in FIG. 14, it is also difficult to detect, after recovered the status when the program or erase operations for the main memory 2 is suspended because of a power failure or a system error occurrence, and there is the other problem to require too much time to recovery the system.
Accordingly, it is an object of the present invention to provide an electric device including a flash memory, in which error information can be easily detected after the system is recovered, and by which the memory can be easily recovered in a short time, even if program or erase operation is suspended because of a power source failure or system error occurrence.
It is another object of the present invention to provide an electric device including a flash memory, in which error information can be maintained when an abnormal operation is executed in the flash memory, and the memory can be earlier and easily recovered in a short time after executing the abnormal operation.
It is still another object of the present invention to provide an electric device including a flash memory, which can be continuously used, even if a defective bit is found while using the flash memory.
To achieve the above-described objects, an electric device with a flash memory built-in according to the present invention includes a flash memory, a control section for controlling the flash memory, and an auxiliary non-volatile memory, which records information of a bus for connecting the flash memory and the control section at a prescribed timing. The auxiliary non-volatile memory is preferably to a memory, which can write data in higher speed than the flash memory, for example, a ferroelectric RAM (FeRAM). The FeRAM is a memory using a polarization of a ferroelectric. In general, the FeRAM is activated as the same as a DRAM, and data recorded in the FeRAM is maintained when an electric source is shut down. Further, the operation for writing data in the FeRAM is executed in higher speed than that in a non-volatile memory formed of a floating gate type MOS transistor, which is used in the conventional flash memory.
To achieve the above-described objects, an electric device including a flash memory composed of a non-volatile memory and a control section connected to the flash memory through a bus for supplying control commands thereto through the bus and controlling the flash memory, further includes an auxiliary non-volatile memory, of which the write operation is executed in higher speed than that of the flash memory, wherein the control section records the bus information on the auxiliary non-volatile memory at a prescribed timing.